package middleware

import (
	"gitee.com/chejiangyi/bsfgo/core/base2"
	"gitee.com/chejiangyi/bsfgo/core/utils"
	"gitee.com/chejiangyi/bsfgo/gin2/swagger"
	"github.com/gin-gonic/gin"
)

type SwaggerMiddleware struct{}

func (*SwaggerMiddleware) GetOrder() float64 {
	return -91
}
func (m *SwaggerMiddleware) Enabled() bool {
	return base2.BsfConfigInstance.GetSwaggerEnabled()
}
func (*SwaggerMiddleware) Middleware(r *gin.Engine) {
	swagger.SwaggerUtil.InitSwagger(r)
	utils.LogUtil.Info("SwaggerMiddleware已开启")
}
